// Package client defines the client interface for GoCelery
package client

import (
	"time"

	"gitee.com/yuebanlaosiji/gocelery/pkg/types"
)

// Task represents a task to be executed
type Task struct {
	ID        string
	Name      string
	Args      []interface{}
	Kwargs    map[string]interface{}
	Retries   int
	ETA       *time.Time
	ExpiresAt *time.Time
}

// Client is the interface for task submission
type Client interface {
	// Send a task to the queue
	SendTask(task types.Task) (string, error)

	// Get the result of a task
	GetResult(taskID string) (interface{}, error)

	// Wait for task completion with timeout
	WaitForResult(taskID string, timeout time.Duration) (interface{}, error)
}
